package com.tyf.dubbo.model;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.core.activerecord.Model;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;


@Data
@Accessors(chain = true)
public class Student extends Model<Student> {

    /** 学生ID */
    @Id
    private Integer id ;
    /** 学生姓名 */
    private String name ;
    /** 学生性别 */
    private String gender ;
    /** 学生生日 */
    private LocalDateTime birthday ;
    /** 学生住址 */
    private String address ;
    /** 学生联系方式 */
    private String phone ;

    public Student addBirthday() {
        this.birthday = LocalDateTime.now();
        this.address = "";
        this.gender = "";
        this.phone = "18651060509";
        return this;
    }

    public String getName() {
        return name;
    }
}
